<template>
  <div class="authority coachAuthority">
    <div class="left">
      <span :class="1 > 2 ? 'soltNum soltNumnor' : 'soltNum'">{{
        sortNum + 1
      }}</span>
    </div>
    <div class="right">
      <div class="coach">
        <div class="headerImg">
          <img :src="coachItem.head_img" alt="" />
        </div>
        <div class="nameBox">
          <nuxt-link :to="{name:'coach-coachDetails-id',query: { coachId: coachItem.coach_id }}">
            <span class="curp">{{ coachItem.name }}</span>
          </nuxt-link>
          <div class="botText">
            <span class="tips">学员：{{ coachItem.crCount }}</span>
            <span class="comment">{{ coachItem.ccCount }}点评</span>
            <span class="people">{{ coachItem.ccAvg }}分</span>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  components: {},
  props: {
    coachItem: {
      type: Object,
      default: () => {
        return {};
      },
    },
    sortNum: {
      type: Number,
      default: 0,
    },
  },
  data() {
    return {
      ranklist: [],
    };
  },
  methods: {},
};
</script>

<style scoped lang='scss'>
.authority {
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px;
  .soltNum {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    line-height: 20px;
    text-align: center;
    background-color: #449bff;
    color: #fff;
    margin-right: 10px;
  }

  .soltNumnor {
    background-color: #acacac;
  }

  .people {
    color: #feb31e;
  }

  .comment {
    color: #bcbcbc;
  }
}

.coachAuthority {
  .right {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-grow: 1;
    .coach {
      display: flex;
      width: 100%;
      .headerImg {
        width: 40px;
        height: 40px;
        overflow: hidden;
        border-radius: 50%;
        background-color: #000;
        margin-right: 10px;

        img {
          width: 100%;
          height: 100%;
        }
      }

      .nameBox {
        font-size: 16px;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        .tips {
          font-size: 12px;
        }
      }
      .botText {
        margin-top: 8px;
        font-size: 12px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        .people {
          font-size: 14px;
        }
      }
    }
  }
}
</style>